open

suspend fun open(blob: Blob, preloadSize: Int = DEFAULT_PRELOAD_SIZE): JsBlobRandomAccessSource(source)

Open a Blob for streaming random access.

Pre-loads the first preloadSize bytes for synchronous metadata parsing. Use readAtAsync for accessing data beyond the preloaded buffer.

Return

JsBlobRandomAccessSource ready for use

Parameters

blob

The Blob or File to read from

preloadSize

How much to preload for sync access (default 50MB)